package cn.hy.tiny.demo.core;

import java.io.InputStream;

/**
 * @Author huang.xy
 * @Description TODO
 */
public class SqlSessionFactoryBuilder {

    public SqlSessionFactoryBuilder() {
    }

    public SqlSessionFactory build(InputStream inputStream) throws Exception {
        XMLConfigurationBuilder xmlConfigurationBuilder = new XMLConfigurationBuilder();
        Configuration configuration = xmlConfigurationBuilder.parseConfiguration(inputStream);
        return new SqlSessionFactory(configuration);
    }
}
